package com.zenithmind.classroom.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 课程VO
 * 
 * @author ZenithMind Team
 * @since 2025-01-09
 */
@Data
@Schema(description = "课程VO")
public class CourseVO {

    /**
     * 课程ID
     */
    @Schema(description = "课程ID")
    private String id;

    /**
     * 课程标题
     */
    @Schema(description = "课程标题")
    private String title;

    /**
     * 课程副标题
     */
    @Schema(description = "课程副标题")
    private String subtitle;

    /**
     * 课程描述
     */
    @Schema(description = "课程描述")
    private String description;

    /**
     * 课程封面图片URL
     */
    @Schema(description = "课程封面图片URL")
    private String coverImageUrl;

    /**
     * 讲师用户ID
     */
    @Schema(description = "讲师用户ID")
    private String instructorId;

    /**
     * 讲师姓名
     */
    @Schema(description = "讲师姓名")
    private String instructorName;

    /**
     * 讲师头像
     */
    @Schema(description = "讲师头像")
    private String instructorAvatar;

    /**
     * 课程分类ID
     */
    @Schema(description = "课程分类ID")
    private String categoryId;

    /**
     * 课程分类名称
     */
    @Schema(description = "课程分类名称")
    private String categoryName;

    /**
     * 课程价格
     */
    @Schema(description = "课程价格")
    private Double price;

    /**
     * 课程状态
     */
    @Schema(description = "课程状态")
    private Integer status;

    /**
     * 课程状态名称
     */
    @Schema(description = "课程状态名称")
    private String statusName;

    /**
     * 课程难度
     */
    @Schema(description = "课程难度")
    private Integer difficulty;

    /**
     * 课程难度名称
     */
    @Schema(description = "课程难度名称")
    private String difficultyName;

    /**
     * 课程类型
     */
    @Schema(description = "课程类型")
    private Integer type;

    /**
     * 课程类型名称
     */
    @Schema(description = "课程类型名称")
    private String typeName;

    /**
     * 课程标签
     */
    @Schema(description = "课程标签")
    private List<String> tags;

    /**
     * 预计学习时长（小时）
     */
    @Schema(description = "预计学习时长（小时）")
    private Integer estimatedHours;

    /**
     * 章节数量
     */
    @Schema(description = "章节数量")
    private Integer chapterCount;

    /**
     * 课时数量
     */
    @Schema(description = "课时数量")
    private Integer lessonCount;

    /**
     * 学习人数
     */
    @Schema(description = "学习人数")
    private Long studentCount;

    /**
     * 完成人数
     */
    @Schema(description = "完成人数")
    private Long completedCount;

    /**
     * 完成率
     */
    @Schema(description = "完成率")
    private Double completionRate;

    /**
     * 课程评分
     */
    @Schema(description = "课程评分")
    private Double rating;

    /**
     * 评价数量
     */
    @Schema(description = "评价数量")
    private Long reviewCount;

    /**
     * 课程介绍视频URL
     */
    @Schema(description = "课程介绍视频URL")
    private String introVideoUrl;

    /**
     * 学习目标
     */
    @Schema(description = "学习目标")
    private String objectives;

    /**
     * 适合人群
     */
    @Schema(description = "适合人群")
    private String targetAudience;

    /**
     * 先修要求
     */
    @Schema(description = "先修要求")
    private String prerequisites;

    /**
     * 是否推荐
     */
    @Schema(description = "是否推荐")
    private Integer isRecommend;

    /**
     * 是否热门
     */
    @Schema(description = "是否热门")
    private Integer isHot;

    /**
     * 是否新课程
     */
    @Schema(description = "是否新课程")
    private Integer isNew;

    /**
     * 是否免费
     */
    @Schema(description = "是否免费")
    private Integer isFree;

    /**
     * 是否置顶
     */
    @Schema(description = "是否置顶")
    private Integer isTop;

    /**
     * 发布时间
     */
    @Schema(description = "发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime publishTime;

    /**
     * 最后更新时间
     */
    @Schema(description = "最后更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastUpdateTime;

    /**
     * 课程有效期（天）
     */
    @Schema(description = "课程有效期（天）")
    private Integer validityDays;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    // 用户相关信息
    /**
     * 用户是否已报名
     */
    @Schema(description = "用户是否已报名")
    private Boolean isEnrolled;

    /**
     * 用户学习进度
     */
    @Schema(description = "用户学习进度")
    private Integer userProgress;

    /**
     * 用户学习时长
     */
    @Schema(description = "用户学习时长")
    private Integer userStudyTime;

    /**
     * 用户是否收藏
     */
    @Schema(description = "用户是否收藏")
    private Boolean isFavorite;

    /**
     * 用户评分
     */
    @Schema(description = "用户评分")
    private Integer userRating;

    /**
     * 用户最后学习时间
     */
    @Schema(description = "用户最后学习时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime userLastStudyTime;

    /**
     * 用户是否完成
     */
    @Schema(description = "用户是否完成")
    private Boolean isCompleted;

    /**
     * 用户完成时间
     */
    @Schema(description = "用户完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime userCompletionTime;

    /**
     * 相对时间描述
     */
    @Schema(description = "相对时间描述")
    private String relativeTime;

    /**
     * 价格显示文本
     */
    @Schema(description = "价格显示文本")
    private String priceText;

    /**
     * 是否可以试看
     */
    @Schema(description = "是否可以试看")
    private Boolean canPreview;

    /**
     * 试看课时数
     */
    @Schema(description = "试看课时数")
    private Integer previewLessonCount;
}
